package wangwenjun.phase2.concurrencypattern.eventbus.google.demo02;

import com.google.common.eventbus.EventBus;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

/**
 * @author ChangLiang
 * @date 2020/6/19
 */
@Slf4j
public class AppTest {
    
    @Test
    @DisplayName("test multiple methods")
    public void test(){
        EventBus eventBus = new EventBus();
        eventBus.register(new SimpleListener());
        String itemId = "1";
        eventBus.post(itemId);
        log.info("post the item id:{}",itemId);
    }

    @Test
    @DisplayName("test multiple methods")
    public void test2(){
        EventBus eventBus = new EventBus();
        eventBus.register(new SimpleListener());
        Integer itemId = 1;
        eventBus.post(itemId);
        log.info("post the item id:{}",itemId);
    }

}
